import java.time.Duration;

public class Main {

    public static void main(String[] args) {
        String renewalRate = "PT120S"; // 表示120秒
//        Duration duration = Duration.parse(durationString);
//
//        long seconds = duration.getSeconds();
        long seconds = Duration.parse(renewalRate).toMillis();
        System.out.println("Seconds: " + seconds);
    }
}
